Camera With Exif Plugin

Description

Capture Exif and geolocation information when the user takes a photo or uploads a photo from the Photo Library with the Camera With Exif Plugin.

Discussion

The Camera With Exif plugin, developed by Alpha Software, is a modified version of the cordova-plugin-camera that provides the addition of the EXIF and geolocation metadata to all camera and gallery images and returns this metadata along with the image file URI to the success callback. This allows the image metadata to be stored to a database along with the image or the image file reference. The metadata does not need to be parsed from the image itself because it is included in the success callback.

See GitHub: cordova-plugin-camera-with-exif for the full documentation.

images/camera_with_exif.jpg

If you use the Image Capture - Camera/Photo Library action in Action Javascript and you use the Camera with Exit plugin, then when you write the Javascript to execute when image has been captured property, you will be able to reference this variables in your code:

  • options.EXIF.latitude
  • options.EXIF.longitude
  • options.EXIF.altitude
  • options.EXIF.dateTime
  • options.EXIF.ExifJSON - a JSON string with all of the EXIF data returned by the camera

Changes in Camera with Exif Version 1.4.3

The Camera with Exif plugin version 1.4.3 update allows devices running Android 10 and later to include the photo location in the exif metadata. The update also includes a fix for iOS so that images selected from the photo library are displayed in the correct orientation.

In order to use version 1.4.3 of the Camera with Exif plugin, Cordova version 10.0.0 or greater must be installed and Cordova Android version 9.0.0 is required. If you attempt to install the Cordova with Exif plugin with an installed Cordova version that is less than version 10.0.0, then version 1.3.1 of the plugin will be installed and Android devices that are running Android 9.0 and greater will NOT include lat/lon metadata in the returned exif.

If you install Cordova version 10.0.0, Cordova Android 9.0.0 will be automatically installed.

To check the installed Cordova version, from a command window or terminal enter cordova -v.

To check on the Android version installed for a Cordova project, from the Cordova project directory enter cordova platforms list in a command prompt.

In order to update Cordova, you'll need to uninstall the previous version. From a command prompt enter npm uninstall cordova -g. Mac users may need to add the sudo prefix. I.e. sudo npm uninstall cordova -g.

To install the latest release of Cordova, from a command prompt enter npm install -g cordova. Again, Mac users may need to add the sudo prefix.

Limitations

Android, iOS

See Also